package com.bp.system.service;

import com.bp.common.utils.StringUtils;

/**
 * @author shaominjie
 * @description TODO
 * @date 2020/12/7 0007 11:36
 */
public enum  ShortMsgTemplateEnum {
    RESERVATION_SUCCESS_MSG("RESERVATION_SUCCESS_MSG","【湖州市民政局】尊敬的【${name}】您好！请于【$date】 【$time】时段内凭借预约二维码前往【$cemetery】进行祭扫。疫情防控提醒，出行请佩戴口罩并做好防护措施，请按时前往祭扫，并尽快完成祭扫离开。","19e7b238c97744fd8da1ba7bbaf95fbf"),
    RESERVATION_TIP_MSG("RESERVATION_TIP_MSG","【湖州市民政局】尊敬的【${name}】您好！您预约【${date}】 【${time}】位于【$cemetery】的祭扫不要忘记咯。疫情防控提醒，出行请佩戴口罩并做好防护措施，请按时前往祭扫，并尽快完成祭扫离开。","19e7b238c97744fd8da1ba7bbaf95fbf"),
    ;


    private ShortMsgTemplateEnum(String key,String value,String msgId) {
        this.key=key;
        this.value=value;
        this.msgId=msgId;
    }

    public static String getValueByKey(String key){

        String value="";

        ShortMsgTemplateEnum[] status=ShortMsgTemplateEnum.values();

        for(ShortMsgTemplateEnum statu:status){
            if(StringUtils.equals(statu.getKey(), key)){
                return statu.getValue();
            }
        }
        return value;
    }

    private String key;

    private String value;

    private String msgId;




    /**
     * @return the msgId
     */
    public String getMsgId() {
        return msgId;
    }

    /**
     * @param msgId the msgId to set
     */
    public void setMsgId(String msgId) {
        this.msgId = msgId;
    }

    /**
     * @param key the key to set
     */
    public void setKey(String key) {
        this.key = key;
    }

    /**
     * @param value the value to set
     */
    public void setValue(String value) {
        this.value = value;
    }

    /**
     * @return the value
     */
    public String getValue() {
        return value;
    }


    /**
     * @return the key
     */
    public String getKey() {
        return key;
    }
}
